package T5_setPriority;
public class T5_setPriority {
	public static void main(String[] args) {
		for(int i=0;i<10;i++){
			Thread thread = new Thread(new MyThread("lang"+i));
			thread.setPriority(1+i);
			thread.start();
		}
		
	}
}
class MyThread implements Runnable {    
    private String name;    
    public MyThread(String name) {    
        this.name = name;    
    }    
    public void run() {    
        for (int i = 0; i < 10; i++) { 
            System.out.println(name + ": " + i);    
            try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
        }    
    }    
} 

